<?php 
//引进配置信息
include '../include/init.php';
//引入数据库配置信息
include '../include/mysql.config.php';
//引入公共函数
include '../include/common.fun.php';
islogin();
if($_GET){
	$id=isset($_GET['id'])?$_GET['id']+0:0;
	$sql="SELECT * from wd_message where msg_id=$id";
	$message=$db->getOne($sql);

	
}

if($_POST){
		$del=isset($_POST['del'])?$_POST['del']+0:0;
		$where = "msg_id IN ($del)";
		$res = $db->delete('wd_message',$where);
		if($res){
			alert('删除成功','message_list.php');
		}else{
			alert('删除失败');
		}
	}
include 'view/message_read.php';